package com.itheima.edu.info.manager.day10;

public class YanYuan {
private String name;

    public YanYuan() {
    }

    public YanYuan(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "YanYuan{" +
                "name='" + name + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        YanYuan yanYuan = (YanYuan) o;

        return name != null ? name.equals(yanYuan.name) : yanYuan.name == null;
    }

    @Override
    public int hashCode() {
        return name != null ? name.hashCode() : 0;
    }
}
